<script>
function delmn(id)
{
	if(confirm("Bạn có chắc chắn muốn xóa Menu này?"))
		location.href='{$smarty.const.base_admin}?act=add-menu&do=del&id='+id;
}
</script>
 <!-- BEGIN PAGE CONTAINER-->
         <div class="container-fluid">
            <!-- BEGIN PAGE HEADER-->   
            <div class="row-fluid">
               <div class="span12">
                   <!-- BEGIN THEME CUSTOMIZER-->
                   <div id="theme-change" class="hidden-phone">
                       <i class="icon-cogs"></i>
                        <span class="settings">
                            <span class="text">Theme Color:</span>
                            <span class="colors">
                                <span class="color-default" data-style="default"></span>
                                <span class="color-green" data-style="green"></span>
                                <span class="color-gray" data-style="gray"></span>
                                <span class="color-purple" data-style="purple"></span>
                                <span class="color-red" data-style="red"></span>
                            </span>
                        </span>
                   </div>
                   <!-- END THEME CUSTOMIZER-->
                  <!-- BEGIN PAGE TITLE & BREADCRUMB-->
                   <h3 class="page-title">
                     {$nameact}
                   </h3>
                   <!-- END PAGE TITLE & BREADCRUMB-->
               </div>
            </div>
            <!-- END PAGE HEADER-->
            <!-- BEGIN ADVANCED TABLE widget-->
            <div class="row-fluid">
                <div class="span12">
                <!-- BEGIN EXAMPLE TABLE widget-->
                <div class="widget green">
                    <div class="widget-title">
                        <h4><i class="icon-reorder"></i> {$nameact}</h4>
                            <span class="tools">
                                <a href="javascript:;" class="icon-chevron-down"></a>
                                <a href="javascript:;" class="icon-remove"></a>
                            </span>
                    </div>
					{$msg}<br>
                    <div class="widget-body">
                        <form action="" method="post" class="form-horizontal">
						{if $menu.id neq ""}
                            <div class="control-group">
                                <label class="control-label">Menu ID</label>
                                <div class="controls">
                                    <input class="span6" type="text" value="{$menu.id}" disabled />
									<input type=hidden name='id' value='{$menu.id}'>
                                </div>
                            </div>
						{/if}
							<div class="control-group">
                                <label class="control-label">Tên Menu</label>
                                <div class="controls">
                                    <input type="text" class="span6" name="name" value="{$menu.name}" />
                                </div>
                            </div>
							<div class="control-group">
                                <label class="control-label">Code</label>
                                <div class="controls">
                                    <input class="span6 " type="text" name="code" value="{$menu.code}" />
									<input type=hidden name='cur_code' value='{$menu.code}'>
                                </div>
                            </div>
							<div class="control-group">
                                <label class="control-label">Parents</label>
                                <div class="controls">
                                    {$parent}
                                </div>
                            </div>
							<div class="control-group">
                                <label class="control-label">Loại</label>
                                <div class="controls">
									<select name="type">
									{html_options options =$arr_type selected = $menu.type}
									</select><br>
									<i><font size=-1>Page: tạo menu là 1 trang cụ thể.<br>
													Box 1: Tạo Menu chứa tin tức, trình bày theo dòng, có tóm tắt.<br>
													Box2: Tạo Menu chứa tin tức, trình bày theo lưới ô vuông.
									</font></i>
                                </div>
                            </div>
							<div class="control-group">
                                <label class="control-label">Thứ tự</label>
                                <div class="controls">
                                    <input class="span6 " type="text" name="sort" value="{$menu.sort}" />
                                </div>
                            </div>
							<div class="control-group">
                                <label class="control-label">Hiển thị ở trang chủ</label>
                                <div class="controls">
									<div id="height-text-style-toggle-button">
                                       <input type=checkbox name='is_showhome' value='1' {$menu.is_showhome}>
                                    </div>
                                </div>
                            </div>
							<div class="control-group">
                                <label class="control-label">Hiển thị trên Menu</label>
                                <div class="controls">
									<div id="height-text-style-toggle-button">
                                        <input type=checkbox name='is_active' value='1' {$menu.is_active}>
                                    </div>
                                </div>
                            </div>
							<div class="control-group">
                                <label class="control-label">Hiển thị các tin cùng loại</label>
                                <div class="controls">
									<div id="height-text-style-toggle-button">
                                        <input type=checkbox name='is_samecat' value='1' {$menu.is_samecat}>
                                    </div>
                                </div>
                            </div>
							<div class="control-group">
                                <label class="control-label">Cho phép comment</label>
                                <div class="controls">
									<div id="height-text-style-toggle-button">
                                        <input type=checkbox name='is_comment' value='1' {$menu.is_comment}>
                                    </div>
                                </div>
                            </div>
						
			  <div class="form-actions">
                      <button type="submit" name="save" class="btn blue" value='Lưu'><i class=" icon-ok"></i> Lưu</button>
                      {if $menu.id neq ""}<button type="button" class="btn" onclick="delmn({$menu.id})"><i class=" icon-remove"></i> Xóa</button>{/if}
					  <button type="button" class="btn" onclick="location.href='{$smarty.const.base_admin}?act=menu'"><i class="icon-chevron-left"></i> Trở về</button>
                                </div>
		</form>
                    </div>
                </div>
                <!-- END EXAMPLE TABLE widget-->
                </div>
            </div>

            <!-- END ADVANCED TABLE widget-->
         </div>
         <!-- END PAGE CONTAINER-->
 